<template>
	<view class="loadMore" v-if="isLoading || isDone">
		<i v-if="isLoading" class="iconfont iconjiazai" :style="{color:textColor}"></i>
		<view class="" :style="{color:textColor}">{{isDone ? doneText : text}}</view>
	</view>
</template>

<script>
	export default {
		name:"loadMore",
		props:{
			isLoading:{
				type:Boolean,
				default:false
			},
			isDone:{
				type:Boolean,
				default:false
			},
			text:{
				type:String,
				default:'加载中...'
			},
			doneText:{
				type:String,
				default:'没有更多的了'
			},
			textColor:{
				type:String,
				default:'#2989FD'
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	@keyframes rota360{
		0%{
			transform: rotateZ(90deg);
		}
		50%{
			transform: rotateZ(180deg);
		}
		75%{
			transform: rotateZ(270deg);
		}
		100%{
			transform: rotateZ(360deg);
		}
	}
	.loadMore{
		width: 100%;
		@include flex_center;
		font-size: 24rpx;
		padding: 10rpx 0;
		margin-top: 20rpx;
		.iconfont{
			animation:rota360 1s linear infinite;
			margin-right: 20rpx;
		}
	}
</style>
